package nl.rivm.screenit.service.impl;

/*-
 * ========================LICENSE_START=================================
 * screenit-base
 * %%
 * Copyright (C) 2012 - 2020 Facilitaire Samenwerking Bevolkingsonderzoek
 * %%
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * =========================LICENSE_END==================================
 */

import java.util.List;

import nl.rivm.screenit.dao.NieuwsDao;
import nl.rivm.screenit.model.Gebruiker;
import nl.rivm.screenit.model.nieuws.NieuwsItem;
import nl.rivm.screenit.service.NieuwsService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional(propagation = Propagation.SUPPORTS)
public class NieuwsServiceImpl implements NieuwsService
{
	@Autowired
	private NieuwsDao nieuwsDao;

	@Override
	public List<NieuwsItem> getNieuwsItems(boolean inclusiefVerlopenNieuwsItems)
	{
		return nieuwsDao.getNieuwsItems(inclusiefVerlopenNieuwsItems);
	}

	@Override
	public List<Long> getNieuwsItemIdsGebruiker(Gebruiker gebruiker)
	{
		return nieuwsDao.getNieuwsItemIdsGebruiker(gebruiker);
	}
}
